package br.com.rglariguet.pioneer.dao;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import br.com.rglariguet.pioneer.modelos.Perfil;

@Repository
@Transactional
public class PerfilDAO extends DaoGenerico<Perfil> {

	
	public Perfil buscaPorNome(String nome) {
		return (Perfil) getSession()
				.createQuery(
						"from Perfil as perfil where perfil.nome = :nome")
				.setParameter("nome", nome).uniqueResult();
	}
}
